define(['ash', 'game/vos/EnemyVO', 'game/constants/PerkConstants'],
	function (Ash, EnemyVO, PerkConstants) {

		var EnemyConstants = {

			enemyTypes: {
				global: "global",			// anywhere
				nohazard: "nohazard",    	// sectors with no hazards
				cold: "cold",            	// cold sectors
				dark: "dark",            	// dark sectors
				radiation: "radiation",  	// radiactive sectors
				dense: "dense",          	// densely built sectors
				sparse: "sparse",        	// sparsely built sectors
				inhabited: "inhabited",  	// has fairly recent human habitation
				uninhabited: "inhabited",	// no recent human habitation
				sunlit: "sunlit",        	// sunlit sectors
				toxic: "toxic",          	// polluted sectors
				water: "water",          	// sectors with water (or neighbours)
			},

			enemyDefinitions: {
				global: [],
				nohazard: [],
				cold: [],
				dark: [],
				radiation: [],
				dense: [],
				sparse: [],
				inhabited: [],
				uninhabited: [],
				sunlit: [],
				toxic: [],
				water: [],
			},

			enemyTexts: {
				bandit: {
					nouns: ["土匪", "暴徒"],
					groupNouns: ["暴民", "团伙"],
					verbsActive: ["巡逻队", "受控的", "所守护", "所占用"],
					verbsDefeated: ["被驱赶", "已除尽"],
				},
				big_animal: {
					nouns: ["攻击性动物", "野生动物", "动物", "敌害动物"],
					groupNouns: ["打包", "暴民", "团伙"],
					verbsActive: ["挤满", "所守护", "所占用"],
					verbsDefeated: ["已清除", "已除尽"],
				},
				bird: {
					nouns: ["城市害虫", "鸟类", "动物", "攻击性动物", "敌害动物"],
					groupNouns: ["群体", "云集", "团伙", "暴民"],
					verbsActive: ["挤满", "侵扰", "所占用", "所守护"],
					verbsDefeated: ["已除尽", "已清除", "被赶走"],
				},
				flora: {
					nouns: ["城市害虫", "有害植物", "敌害动物"],
					groupNouns: ["群组", "团体"],
					verbsActive: ["侵扰", "覆盖", "挤满"],
					verbsDefeated: ["已清除"],
				},
				fungi: {
					nouns: ["城市害虫", "危险真菌", "敌害动物"],
					groupNouns: ["群组", "团体"],
					verbsActive: ["侵扰", "覆盖", "挤满"],
					verbsDefeated: ["已清除", "已除尽"],
				},
				humanoid: {
					nouns: ["狰狞动物"],
					groupNouns: ["暴民", "团伙", "团体"],
					verbsActive: ["所守护", "所占用"],
					verbsDefeated: ["被驱赶"],
				},
				robot: {
					nouns: ["攻击型机器人"],
					groupNouns: ["暴民", "团伙", "团体", "云集", "cell"],
					verbsActive: ["巡逻队", "受控的", "所守护", "所占用"],
					verbsDefeated: ["伤残", "已清除", "毁灭"],
				},
				small_animal: {
					nouns: ["城市害虫", "攻击性动物", "野生动物", "动物", "敌害动物"],
					groupNouns: ["云集", "打包", "暴民", "团体", "horde"],
					verbsActive: ["横行", "挤满"],
					verbsDefeated: ["已除尽", "已清除"],
				},
				structure: {
					nouns: ["自动化架构"],
					groupNouns: ["团体", "规定"],
					verbsActive: ["受阻于"],
					verbsDefeated: ["伤残"],
				},
			},

			enemyLoot: {
				bandit: {
					droppedResources: ["food", "water", "rope"],
					droppedIngredients: ["res_bands", "res_bottle", "res_hairpin", "res_leather", "res_silk", "res_tape"],
				},
				big_动物: {
					droppedResources: ["food"],
					droppedIngredients: ["res_bands", "res_leather"],
				},
				bird: {
					droppedResources: ["food"],
					droppedIngredients: ["res_bands", "res_bottle", "res_glowbug", "res_hairpin", "res_leather", "res_tape"],
				},
				flora: {
					droppedResources: ["food"],
					droppedIngredients: ["res_bottle", "res_glowbug", "res_silk"],
				},
				fungi: {
					droppedResources: ["food"],
					droppedIngredients: ["res_bottle", "res_glowbug", "res_silk"],
				},
				humanoid: {
					droppedResources: ["water"],
					droppedIngredients: ["res_bands", "res_bottle", "res_hairpin", "res_leather", "res_silk", "res_tape"],
				},
				robot: {
					droppedResources: ["metal", "fuel"],
					droppedIngredients: ["res_bands", "res_bottle", "res_hairpin", "res_tape"],
				},
				small_动物: {
					droppedResources: ["food"],
					droppedIngredients: ["res_bands", "res_glowbug", "res_hairpin", "res_leather", "res_silk"],
				},
				structure: {
					droppedResources: ["metal"],
					droppedIngredients: ["res_bands", "res_bottle", "res_glowbug", "res_hairpin", "res_tape"],
				},
			},

			enemyInjuries: {
				bandit: [PerkConstants.injuryType.SHARP, PerkConstants.injuryType.BLUNT],
				big_animal: [PerkConstants.injuryType.SHARP, PerkConstants.injuryType.BLUNT],
				bird: [PerkConstants.injuryType.SHARP],
				flora: [PerkConstants.injuryType.BLUNT],
				fungi: [PerkConstants.injuryType.BLUNT],
				humanoid: [PerkConstants.injuryType.SHARP, PerkConstants.injuryType.BLUNT],
				robot: [PerkConstants.injuryType.SHARP, PerkConstants.injuryType.BLUNT],
				small_animal: [PerkConstants.injuryType.SHARP],
				structure: [PerkConstants.injuryType.BLUNT],
			},

			// saved for convenience & startup speed
			enemyDifficulties: {},

			getEnemy: function (enemyID) {
				for (var type in this.enemyDefinitions) {
					for (let i in this.enemyDefinitions[type]) {
						var enemy = this.enemyDefinitions[type][i];
						if (enemy.id == enemyID) {
							return enemy;
						}
					}
				}
				log.w("没有发现这样的敌人: " + enemyID);
				return null;
			},

			getAll: function () {
				let result = [];
				for (var type in this.enemyDefinitions) {
					for (let i in this.enemyDefinitions[type]) {
						var enemy = this.enemyDefinitions[type][i];
						result.push(enemy);
					}
				}
				return result;
			},

			getDifficulty: function (enemy) {
				return this.enemyDifficulties[enemy.id];
			}

		};


		return EnemyConstants;

	});
